{extend name="default/template/base_index" /}


{block name="area_header"}

{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}
	<div class="admin-main container-fluid">
		{include file="default/Widget/left" /}
		<div class="admin-main-content">
			{include file="default/Widget/breadcrumb" /}
				<!-- 过滤\查询按钮 -->
				<div class="filter-controls">
					<!-- 日期查询 -->
					<form action="{:url('Wxshop/index')}" method="post" class="form-inline">
						<div class="form-group">
							<label>店铺名称</label>
							<input type="text" name="name" value="{$name}" class="form-control input-sm" placeholder="店铺名称" />
						</div>
						<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
					</form>
				</div>
				<!-- 操作按钮 -->
				<div class="btn-controls">
					<a class="btn btn-primary btn-sm" href="{:url('Wxshop/add')}"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
				
				</div>

				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								店铺ID
							</th>
							<th>
								店铺名称
							</th>
							<th>
								店铺主微信号
							</th>
							<th>
								创建时间
							</th>
							<th>
								操作
							</th>
						</tr>
					</thead>
					<tbody>
						{empty name="list"}
							<tr>
								<td colspan="3" class="text-center">{:L('NO_DATA')}</td>
							</tr>
							{else/}
							{volist name="list" id="vo"}
								<tr>							
									<td>
										{$vo.id}
									</td>
									<td>{$vo.name}<img src="{$vo.logo}" alt='logo' style="max-width:40px;" />
									</td>						
									<td>
										{$vo.wxno}
									</td>							
									<td>
										{$vo.createtime|date='Y-m-d h:i:s',###}
									</td>			
									<!--<td>
										{:($vo['isopen'] == "1"?"营业中":"休息中")}
										<a href="{:url('Wxshop/open',array('id'=>$vo['id'],'isopen'=>$vo['isopen']))}" class="btn btn-primary btn-sm ajax-get" ><i class="fa fa-chain"></i>{:($vo['isopen'] == "1"?"改为休息":"改为营业")}</a>
									</td>-->
									
									<td>
										<a href="{:url('Product/index',array('storeid'=>$vo['id']))}" class="btn btn-sm btn-primary"><i class="fa fa-building"></i>店铺商品管理</a>
										<a href="{:url('Wxshop/edit',array('id'=>$vo['id']))}" class="btn btn-sm btn-default"><i class="fa fa-edit"></i>编辑</a>
										<a href="{:url('Wxshop/delete',array('id'=>$vo['id']))}" class="ajax-get confirm btn btn-sm btn-danger"><i class="fa fa-trash"></i>删除</a>
									</td>
								</tr>

							{/volist}
						{/empty}
					</tbody>
				</table>
				<div>{$show}</div>
			</div>

			<script type="text/javascript">
			</script>
		</div>
		<!-- END admin-main-content -->
	</div>
		<!-- END admin-main-->
{/block}

{block name="area_footer"}

{/block}